<?php
include("../inc/Function_user.php");
upower();
$psize = 20;
$page = isset($_GET['page'])?intval($_GET['page']):1;
$state = isset($_GET['state'])?intval($_GET['state']):5;
$type = isset($_GET['type'])?intval($_GET['type']):0;
$info = userinfo();
$list = orderlist($page,$psize,$info['Id'],$state,$type);
$num = orderlistnum($info['Id'],$state,$type);
if($list){
    $msg = 1;
}else{
    $msg = 0;
}
$page = page1($num,$psize,$page,$_SERVER['PHP_SELF']."?state=$state&type=$type");
$set = set();
$tpl->assign("set",$set);
$tpl->assign("olist",$list);
$tpl->assign("msg",$msg);
$tpl->assign("page",$page);
$tpl->assign("state",$state);
$tpl->assign("type",$type);
$tpl->assign("osarr1",$osarr1);
$tpl->assign("osarr2",$osarr2);
$tpl->assign("payarr",$payarr);
$tpl->show("orderlist");
?>